package schedule8087.entity.vo;

import lombok.Data;
import lombok.ToString;

/**
 * @author ttxxi
 */
@Data
@ToString
public class ResultVO<T> {
    private Integer status;

    private String msg;

    private T data;

    public ResultVO(Integer status, String msg, T data) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }

    public static class SUCCESS<T> extends ResultVO<T>{

        static Integer code = 200;

        public SUCCESS() {
            super(code, null, null);
        }

        public SUCCESS(T data){
            super(code, null, data);
        }

        public SUCCESS(String msg, T data){
            super(code, msg, data);
        }
    }

    public static class FAIL<T> extends ResultVO<T>{

        static Integer code = 500;

        public FAIL() {
            super(code, null, null);
        }

        public FAIL(T data){
            super(code, null, data);
        }

        public FAIL(String msg, T data){
            super(code, msg, data);
        }
    }


}